namespace CodeConsult.Nordic.nRF8001.ApplicationControlInterface.Events.SystemEvents
{
    public class TimingEvent : AciEventBase
    {
        public const byte OpCode = 0x89;
 
        public ushort ConnectionInterval { get; set; }
        public ushort SlaveLacency { get; set; }
        public ushort SupervisionTimeout { get; set; }

        protected override void DecodeFromBuffer()
        {
            ConnectionInterval = DecodeHelper.GetUnsignedShort(DecodeHelper.ByteOrder.LsbMsb);
            SlaveLacency = DecodeHelper.GetUnsignedShort(DecodeHelper.ByteOrder.LsbMsb);
            SupervisionTimeout = DecodeHelper.GetUnsignedShort(DecodeHelper.ByteOrder.LsbMsb);
        }
    }
}
